local xingshang = fk.CreateSkill({
    name = "sj4__xingshang",
    tags = {Skill.Compulsory},
  })
  
  Fk:loadTranslationTable{
    ["sj4__xingshang"] = "行殇",
    [":sj4__xingshang"] = "<b>锁定技</b>，当一名角色翻面后，若其：未横置，你摸一张牌；翻至正面，你重铸其一张牌。",
  
    ["#sj4__xingshang"] = "行殇：重铸 %dest 一张牌",

   ["$sj4__xingshang1"] = "亡者伴风去，孤犹雨中嗟。",
   ["$sj4__xingshang2"] = "其物犹如故，其人已不存。",
  }

  xingshang:addEffect(fk.TurnedOver, {
    can_trigger = function(self, event, target, player, data)
      return player:hasSkill(xingshang.name) and 
      ((target.faceup and not target:isNude()) or not target.chained)
     end,
    on_use = function(self, event, target, player, data)
      if not target.chained then
        player:drawCards(1,xingshang.name)
      else
        local id = player.room:askToChooseCard(player,{
          target = target,
          flag = "he",
          skill_name = xingshang.name,
          prompt = "#sj4__xingshang::"..target.id,
        })
        player.room:recastCard({id},target,xingshang.name)
      end
    end,
  })

  return xingshang